import { Column, Entity, Index } from "typeorm";
import { BaseEntity } from "../../base/entity/base";

/**
 * 核销记录
 */
@Entity('order_verify', { comment: '订单核销' })
export class OrderVerifyEntity extends BaseEntity {
    @Index()
    @Column({ comment: '订单ID' })
    orderId: number;

    @Index()
    @Column({ comment: '订单子项ID', nullable: true })
    itemId: number;

    @Index()
    @Column({ comment: '核销码', length: 64 })
    code: string;

    @Column({ comment: '状态 0-未核销 1-已核销', dict: ['未核销', '已核销'], default: 0 })
    status: number;

    @Column({ comment: '核销时间', type: 'varchar', length: 30, nullable: true })
    verifyTime: string;

    @Column({ comment: '操作人ID', nullable: true })
    operatorId: number;
}


